﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Text;
using EFTracingProvider;

namespace EFDbContext
{
    /// <summary>
    /// http://efwrappers.codeplex.com/
    /// </summary>
    public partial class ModelDbContextContainer
    {
       public ModelDbContextContainer(string nameOrConnectionString)
            : base(EFTracingProviderUtils.CreateTracedEntityConnection(nameOrConnectionString), true)
        {
            // enable sql tracing
            ((IObjectContextAdapter)this).ObjectContext.EnableTracing();
        }
    }
}
